package com.ymj.netty.common;

import java.util.concurrent.atomic.AtomicLong;


/**
 *  @Description: netty客户端请求类，构造方法会初始化一个唯一递增id
 *  @author: yanmj
 *  @Date: 2020-06-07
 */
public class ClientRequest {

    /*唯一id*/
    private final long id;
    /*data*/
    private Object content;
    /*要调用哪一个方法（全路径：com.ymj.server.controller.UserController.save）*/
    private String command;
    private final AtomicLong atomicLong = new AtomicLong(1);

    public ClientRequest() {
        this.id = atomicLong.getAndIncrement();
    }

    public String getCommand() {
        return command;
    }

    public void setCommand(String command) {
        this.command = command;
    }

    public long getId() {
        return id;
    }

    public Object getContent() {
        return content;
    }

    public void setContent(Object content) {
        this.content = content;
    }
}
